﻿using Bridging.Bridging;
using Bridging.system;
using System;

namespace Bridging
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            //三个系统
            ISystem andoridsystem = new AndoridSystem();
            ISystem iossystem = new IOSSystem();
            ISystem winphonesystem = new WinPhoneSystem();
            
            BasePhoneBridging basePhone = new HuaWeiBridging();
            //上端设置系统，这样可以避免每个机器对应一个系统。这样可能会找出类的爆炸
            //这样就会把 n*m 变成 n+m
            basePhone.SetSystem(andoridsystem);
            basePhone.SetSystem(iossystem);
            basePhone.SetSystem(winphonesystem);
            //如果机器有其他属性，那样效果更明显

            //缺点使用更麻烦
            basePhone.Excute();



        }
    }
}
